package com.atguigu.gulimall.member.service;

import com.atguigu.gulimall.member.Exception.UserUniqueException;
import com.atguigu.gulimall.member.Vo.MemberVo;
import com.atguigu.gulimall.member.Vo.SocialUser;
import com.atguigu.gulimall.member.Vo.UserVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author yangheng
 * @email sunlightcs@gmail.com
 * @date 2023-03-25 10:54:23
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void registMember(UserVo userVo);

    void checkPhoneUnique(String phone) throws UserUniqueException;
    void checkUsernamUnique(String userName) throws UserUniqueException;

    MemberEntity login(MemberVo memberVo);

    MemberEntity socialLogin(SocialUser socialUser) throws Exception;
}

